<template>
  <div v-if="!pdfDownload" class="footer" flex>
    <button class="submit-btn" type="primary" :disabled="submitBtnHasClicked" @click="submitForm">确定</button>
    <button class="cancel-btn" @click="handleCancel">取消</button>
  </div>
</template>

<script>
export default {
  props: {
    pdfDownload: {
      type: Boolean,
      default: false
    },
    submitDis: {
      type: Boolean,
      default: false
    },
  },
  data() {
    return {
      submitBtnHasClicked: false
    }
  },
  methods: {
    handleCancel() {
      this.$emit('cancel')
    },
    submitForm() {
      this.$emit('submit')
    }
  }
}
</script>

<style scoped lang="scss">
.footer {
  display: flex;
  justify-content: flex-end;

  button {
    line-height: 1;
    padding: 24rpx 40rpx;
    font-size: 28rpx;
    height: 80rpx;
    margin: 0;
  }

  .cancel-btn {
    margin-left: 10rpx;
  }
}
</style>